package liangtWorkSpace.singleDemo;

/**
 * @ClassName Mag02
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/9 18:24
 */

public class Mag02 {
    private static final Mag02 INSTANCE;
    static {
        INSTANCE = new Mag02();
    }
    private Mag02(){
        
    }
    public static Mag02 getMag02(){
        return INSTANCE;
    }

    public static void main(String[] args) {
        Mag02 mag02 = Mag02.getMag02();
        Mag02 mag01 = Mag02.getMag02();
        System.out.println(mag01 == mag02);
    }
}
